import { GSprite } from "../../../../com/mui/controls/GSprite";
import { ObjCreate } from "../common/ObjCreate";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
type int = number;
//class StarBitmapItem
    
    export  class StarBitmapItem extends GSprite
    {
        constructor(arg1: int, arg2: string)
        {
            super();
            this._bmpArr = [];
            this._bmpNum = arg1;
            this._imgName = arg2;
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc1=null;
            this._bmpArr.splice(0);
            var loc2=0;
            var loc3=0;
            var loc4=0;
            while (loc4 < this._bmpNum) 
            {
                loc1 = ObjCreate.createBitmap(null, loc2, loc3, this);
                loc2 = loc2 + 20;
                loc1.bitmapData = GlobalClass.getBitmapData(this._imgName);
                this._bmpArr.push(loc1);
                ++loc4;
            }
            return;
        }

        public setBitmapData(arg1: string, arg2: int): void
        {
            var loc1=null;
            var loc2=0;
            while (loc2 < arg2) 
            {
                loc1 = this._bmpArr[loc2];
                if (loc1) 
                {
                    loc1.bitmapData = GlobalClass.getBitmapData(arg1);
                }
                ++loc2;
            }
            return;
        }

        /* internal */ /* var */_bmpNum: int;

        /* internal */ /* var */_imgName: string;

        /* internal */ /* var */_bmpArr: Array<any>;
    }
